package com.five.welcome.dao;

import com.five.welcome.entity.WelcomeAnnouncement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author ywt
 * @since 2024-07-15
 */
@Mapper
public interface WelcomeAnnouncementMapper extends BaseMapper<WelcomeAnnouncement> {

    //根据id删除
    @Delete("delete from welcome_announcement where announcement_id=#{id}")
    int deleteAnnounceById(Integer id);

    //修改状态
    @Update("update welcome_announcement set onstart=1,update_time=#{currentDateString} " +
            "where announcement_id=#{id}")
    void modOnStartById(Integer id, String currentDateString);


    void modUnStartById(Integer id, String currentDateString);
}
